1. Field of the Invention
The present invention relates to a switch circuit and a semiconductor device.
2. Background Art
FIG. 4 is a circuit diagram illustrating a conventional voltage controller. The conventional voltage controller is constituted of a voltage detector circuit 503, a positive power supply connection terminal 509 providing a positive power supply of the voltage detector circuit 503, a negative power supply connection terminal 510 providing a negative power supply of the voltage detector circuit 503, a control circuit 508 connected between the positive power supply connection terminal 509 and the negative power supply connection terminal 510, an N-ch transistor 501 having a gate thereof connected to an output of the control circuit 508, a drain thereof connected to an output terminal 511, and a source and a back gate thereof connected to the negative power supply connection terminal 510, and a resistor 512.
The control circuit 508 is constituted of a reference voltage generating circuit 506, resistors 504 and 505, which divide a voltage between the positive power supply connection terminal 509 and the negative power supply connection terminal 510 (the voltage between the positive power supply connection terminal and the negative power supply connection terminal will be hereinafter referred to as “the supply voltage”), and a comparator 507, which compares the voltage divided by the resistors 504 and 505 with a voltage of the reference voltage generating circuit 506. A parasitic diode 502 exists between the drain and the back gate of the N-ch transistor 501. The N-ch transistor 501 will act as a switch circuit of the voltage detector circuit 503.
Connecting the positive power supply connection terminal 509 and the output terminal 511 of the voltage detector circuit 503 and connecting one terminal of the resistor 512 thereto, and connecting the other terminal of the resistor to the positive power supply of a voltage generator 513 constitute the voltage controller, which controls the supply voltage of the voltage detector circuit 503 to a constant level.
A description will now be given of the operation. The supply voltage of the voltage detector circuit 503 is controlled to a voltage obtained by dividing the voltage of the voltage generator 513 by the resistance value of the resistor 512 connected to the positive power supply connection terminal 509 and an ON resistance value of the N-ch transistor 501. If the supply voltage of the voltage detector circuit 503 changes to a higher level, then the voltage divided by the resistors 504 and 505 increases to the voltage of the reference voltage generating circuit 506 or more, and the output of the control circuit 508 increases the gate voltage of the N-ch transistor 501. As the gate voltage increases, the ON resistance value of the N-ch transistor 501 decreases, thus decreasing the voltage between the output terminal 511 and the negative power supply connection terminal 510. The output terminal 511 is connected to the positive power supply connection terminal 509, so that the supply voltage of the voltage detector circuit 503 is also controlled to decrease. If the supply voltage of the voltage detector circuit 503 changes to a lower level, then the ON resistance value of the N-ch transistor 501 increases and the supply voltage of the voltage detector circuit 503 is controlled to increase, which is opposite from the foregoing case. Repeating the foregoing operation causes the voltage controller to operate to continue outputting a constant voltage (refer to, for example, FIG. 1 in Patent Document 1).
[Patent Document 1] Japanese Patent Application Laid-Open No. 2000-284843
However, according to the conventional voltage controller, if the positive power supply connection terminal 509 and the negative power supply connection terminal 510 of the voltage detector circuit 503 are inversely connected to a positive power supply terminal and a negative power supply terminal of the voltage generator 513 (hereinafter referred to as “reverse connection”), then the parasitic diode 502 of the N-ch transistor 501 of the switch circuit will be in the forward direction, because the positive power supply connection terminal 509 and the output terminal 511 are connected. As a result, current that is unexpected in the circuit operation flows through the voltage detector circuit 503. There has been a problem in that the passage of much current that is unexpected in the circuit operation tends to lead to heat generation or ignition, causing deteriorated safety of the voltage controller.